<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest() {
    document.execCommand("InsertParagraph");
}
</script>
<body onload="runRepaintAndPixelTest();">
<p>This tests for a repaint bug.  The old caret position should be invalidated when a paragraph separator is inserted.</p>
<div contenteditable="true">
<div><br></div>
<div id="div"><br></div>
</div>
<script>
var div = document.getElementById("div");
var sel = window.getSelection();

sel.collapse(div, 0);
</script>
</body>
